Method and system for generating a transform size syntax element for video decoding

ABSTRACT

In a video processing system, a method and system for generating a transform size syntax element for video decoding are provided. For high profile mode video decoding operations, the transform sizes may be selected based on the prediction macroblock type and the contents of the macroblock. A set of rules may be utilized to select from a 4×4 or an 8×8 transform size during the encoding operation. Dynamic selection of transform size may be performed on intra-predicted macroblocks, inter-predicted macroblocks, and/or direct mode inter-predicted macroblocks. The encoding operation may generate a transform size syntax element to indicate the transform size that may be used in reconstructing the encoded macroblock. The transform size syntax element may be transmitted to a decoder as part of the encoded video information bit stream.

CROSS-REFERENCE TO RELATED APPLICATIONS/INCORPORATION BY REFERENCE

This patent application is a continuation of U.S. Ser. No. 13/331,734,filed Dec. 20, 2011, which is a divisional of U.S. Ser. No. 11/119,615,filed May 2, 2005 (now U.S. Pat. No. 8,116,374) which claims priorityunder 35 U.S.C. 119(e) to U.S. Provisional Ser. No. 60/568,926, filed onMay 7, 2004 and U.S. Provisional Ser. No. 60/569,176, filed on May 7,2004. The entire contents of each of the above are incorporated hereinby reference.

This application makes reference to United States patent applicationentitled, “METHOD AND SYSTEM FOR DYNAMIC SELECTION OF TRANSFORM SIZE INA VIDEO DECODER BASED ON SIGNAL CONTENT,” having Ser. No. 11/107,138,filed on Apr. 15, 2005.

The above stated applications are hereby incorporated herein byreference in their entirety.

FEDERALLY SPONSORED RESEARCH OR DEVELOPMENT

Not applicable.

MICROFICHE/COPYRIGHT REFERENCE

Not applicable.

FIELD OF THE INVENTION

Certain embodiments of the invention relate to the processing of videosignals. More specifically, certain embodiments of the invention relateto a method and system for generating a transform size syntax elementfor video decoding.

BACKGROUND OF THE INVENTION

The introduction of advanced video applications such as digitaltelevision, high-definition television, and internet-based video hasprompted the need for standardizing compression technologies for use intelevision broadcast and home entertainment systems. For example, theInternational Standards Organization's (ISO) Motion Picture ExpertsGroup (MPEG) developed the MPEG4 compression standard to supportinternet-based video applications. In another example, the Video CodingExperts Group (VCEG) of the International Telecommunication Union'sTelecommunication Standardization Sector (ITU-T) developed the ITU-TH.263 compression standard to support videoconferencing applications.These and other video coding standards are being developed to enablewide utilization of new video technologies in commercial and personalsettings. In 2001, the Joint Video Team (JVT) was formed to develop afull international standard that offered significantly better videocompression efficiency for low bit-rate visual communication systems. Toachieve its goal, the JVT brought together experts from ISO MPEG andfrom ITU-T VCEG. The proposed outcome of this joint effort was to resultin two separate but technically consistent standard specifications: theISO MPEG4 Part 10 and the ITU-T H.264.

The H.264 coding standard provides flexibility by defining a baselineprofile, a main profile, and an extended profile in order to serve avariety of applications. The main profile, for example, is intended tosupport digital television broadcasting and next-generation digitalversatile disk (DVD) applications. The baseline profile, for example, isintended to support mobile applications that may have limited processingcapabilities. The extended profile, for example, is intended to supportstreaming video and may comprise features that provide error resilienceand that facilitate switching between bitstreams.

Enhancements to the H.264 coding standard have resulted from a new setof coding tools known as the fidelity range extensions (FRExt). TheFRExt extensions, for example, are intended to support high imageresolutions needed in applications such as studio video editing,post-production processing, standard definition (SD) and high-definition(HD) television, and enhanced DVD video. The FRExt extensions alsodefine a high profile, which may be utilized to provide higher codingefficiency without adding significant implementation complexity. In thisregard, the high profile may be adapted by applications such as thosesupported by the Blu-ray Disk Association, the digital video broadcast(DVB) standards, the HD-DVD specification of the DVD Forum, and/or thenew broadcast TV specification of the US advanced television systemscommittee (ATSC).

In the profiles defined by the H.264 coding standard, coding orcompression of image and/or video signals may be accomplished by firsttransforming the signal, or an error that may result from predicting thesignal, from a spatial domain representation to a spatial frequencydomain representation. For example, image and/or video signalcompression may be achieved by means of a two dimensional (2D) DiscreteCosine Transform (DCT). Another transformation approach may be toadaptively change the basis functions in a 2D transform based on signalcontent. In this latter approach, for example, the 2D transform may bebased on wavelets. Following the transformation operation, aquantization step may be utilized to zero-out any coefficients withrelatively low values. The transformation and quantization steps mayreduce redundancies in the signal's spatial content by compacting thesignal's energy to as few basis functions as possible. By increasing thesize of the transform, a corresponding increase in signal energycompaction may be achieved thereby improving the performance of theentire compression system.

However, increasing the transform size in order to achieve the type oflow bit-rate system envisioned by the JVT may result in compressionartifacts that may be clearly visible upon displaying the signal afterdecompression or decoding. These artifacts may be particularlynoticeable in areas of sharp transitions such as high contrast edges inimage and video signals. In certain applications, such as thosesupported by the high profile for example, other approaches may benecessary to achieve lower bit-rates, that is, to provide higher codingefficiency, without producing compression artifacts that may result whenlarge transform sizes are utilized in portions of the image and/or videosignals that exhibit sharp or abrupt transitions.

Further limitations and disadvantages of conventional and traditionalapproaches will become apparent to one of skill in the art, throughcomparison of such systems with some aspects of the present invention asset forth in the remainder of the present application with reference tothe drawings.

BRIEF SUMMARY OF THE INVENTION

A system and/or method for generating a transform size syntax elementfor video decoding, substantially as shown in and/or described inconnection with at least one of the figures, as set forth morecompletely in the claims.

These and other advantages, aspects and novel features of the presentinvention, as well as details of an illustrated embodiment thereof, willbe more fully understood from the following description and drawings.

BRIEF DESCRIPTION OF SEVERAL VIEWS OF THE DRAWINGS

FIG. 1 is a block diagram illustrating an exemplary encoder and decodersystem, in connection with an embodiment of the invention.

FIG. 2 is a block diagram of an exemplary H.264-based encoder, inconnection with an embodiment of the invention.

FIG. 3A is a block diagram of a portion of an exemplary H.264-basedencoder with fixed transform size, in connection with an embodiment ofthe invention.

FIG. 3B is a block diagram of a portion of an exemplary H.264-basedencoder where the transform size selection is tied to the bestprediction block size, in connection with an embodiment of theinvention.

FIG. 3C is a block diagram of a portion of an exemplary H.264-basedencoder where the transform size selection is based on image content andthe best prediction block size, in accordance with an embodiment of theinvention.

FIG. 3D is a flow diagram that illustrates exemplary steps forgenerating a transform size syntax element in an H.264-based videoencoder, in accordance with an embodiment of the invention.

FIG. 4 is a flow diagram illustrating exemplary steps for inversetransform block size selection in an H.264-based decoder, in accordancewith an embodiment of the invention.

FIG. 5 is a flow diagram illustrating exemplary steps for inversetransform block size selection in an H.264-based video decoder based ona transform size syntax element, in accordance with an embodiment of theinvention.

DETAILED DESCRIPTION OF THE INVENTION

Certain embodiments of the invention may be found in a method and systemfor generating a transform size syntax element for video decoding. Byimplementing a set of simplified transform selection rules andguidelines in the encoding and decoding processes of image and videosignals, it may be possible to achieve the low bit-rate objective of ISOMPEG4 Part 10 and ITU-T H.264 while minimizing the effects ofcompression artifacts in signals with regions of sharp or abrupttransitions. These selection rules and guidelines may achieve thisobjective by combining the benefits of reduced residual correlationthrough better signal prediction selection with the benefits of largetransform sizes in areas without high detail and/or sharp transitions.In addition to providing improved compression efficiency by transformselection based on image content and prediction block size, the use ofsimple selection rules may reduce the amount of side information thatmay transferred to a decoder to reconstruct the image. Note that thefollowing discussion may generally use the terms “video,” “image,” and“picture” interchangeably. Accordingly, the scope of various aspects ofthe present invention should not be limited by notions of differencebetween the terms “video,” “image,” and “picture.”

FIG. 1 is a block diagram illustrating an exemplary encoder and decodersystem, in connection with an embodiment of the invention. Referring toFIG. 1, there is shown a video encoder 102 and a video decoder 104. Thevideo encoder 102 may comprise suitable logic, circuitry, and/or codethat may be adapted to encode or compress video information from a videosource and generate an encoded video bit stream that comprises theencoded or compressed video information. The generated encoded video bitstream may also comprise side information regarding the encoding orcompression operations in the video encoder 102. The generated encodedvideo bit stream may be transferred to the video decoder 104. The videoencoder 102 may be adapted to support, for example, the ISO MPEG4 Part10 and the ITU-T H.264 standard specifications. Moreover, the videoencoder 102 may be adapted to support, for example, fidelity rangeextensions (FRExt) and a high profile mode of operation associated withthe H.264 standard specification.

The video decoder 104 may comprise suitable logic, circuitry, and/orcode that may be adapted to decode or decompress the encoded video bitstream generated by the video encoder 102 and generate a video signalthat may be transferred to other processing devices, to storage devices,and/or to display devices. The video decoder 104 may be adapted tosupport, for example, the ISO MPEG4 Part 10 and the ITU-T H.264 standardspecifications. Moreover, the video decoder 104 may be adapted tosupport, for example, fidelity range extensions (FRExt) and a highprofile mode of operation associated with the H.264 standardspecification.

When encoding a current picture in the video encoder 102, the currentpicture may be processed in units of a macroblock, where a macroblockcorresponds to, for example, 16×16 pixels in the original image. Amacroblock may be encoded in intra-coded mode, for “I” pictures, or ininter-coded mode, for predictive or “P” pictures and bidirectional or“B” pictures. The intra-coded or “I” pictures may only use theinformation within the picture to perform video compression. In theH.264 standard, for example, the “I” pictures may utilize spatialprediction to reduce redundancy. These self-contained “I” picturesprovide a base value or anchor frame that is an estimate of the value ofsucceeding pictures. Each GOP may generally start with a self-contained“I” picture as the reference or anchor frame from which the otherpictures in the group may be generated for display. The GOP frequency,and correspondingly the frequency of “I” pictures, may be driven byspecific application spaces. The predicted or “P” pictures may use amotion estimation scheme to generate picture elements that may bepredicted from the most recent anchor frame or “I” picture. Compressingthe difference between predicted samples and the source value results inbetter coding efficiency than that which may be achieved by transmittingthe encoded version of the source picture information. At the videodecoder 104, the compressed difference picture is decoded andsubsequently added to a predicted picture for display.

Motion estimation may refer to a process by which an encoder estimatesthe amount of motion for a collection of picture samples in a picture“P”, via displacing another set of picture samples within anotherpicture. Both sets of picture samples may have the same coordinateswithin their corresponding pictures and the displacing may be performedwithin a larger group of picture samples labeled a motion window.Minimizing the difference between the two sets of picture samplesmotivates motion estimation. A displaced set of picture samplescorresponding to a minimum difference may be considered the bestprediction and may be distinguished by a set of motion vectors. Once allthe motion vectors are available, the whole picture may be predicted andsubtracted from the samples of the “P” picture. The resulting differencesignal may then be encoded by the video encoder 102.

Motion compensation may refer to a process by which a decoder recalls aset of motion vectors and displaces the corresponding set of picturesamples. Output samples may be decoded or reconstructed by adding thedisplaced samples to a decoded difference picture. Because it may bedesirable to produce a drift-free output stream, both the encoder andthe decoder need access to the same decoded pictures in order to utilizethe decoded pictures as basis for estimation of other pictures. For thispurpose, the encoder may comprise a copy of the decoder architecture toenable the duplication of reconstructed pictures. As a result, the finalmotion estimation and final displacement may be done on reconstructedpictures.

Since both the “I” pictures and the “P” pictures may be used to predictpixels, they may be referred to as “reference” pictures. Thebidirectional-predicted pictures or “B” pictures may use multiplepictures that occur in a future location in the video sequence and/or ina past location in the video sequence to predict the image samples. Aswith “P” pictures, motion estimation may be used for pixel prediction in“B” pictures and the difference between the original source and thepredicted picture may be compressed by the video encoder 102. At thevideo decoder 104, one or more “B” pictures may be motion compensatedand may be added to the decoded version of the compressed differencesignal for display.

In H.264-based applications, slices or portions of a picture or imagemay comprise macroblocks that are intra-coded or inter-coded. In thisregard, an “I” slice comprises intra-coded macroblocks, a “P” slicecomprises predicted inter-coded macroblocks, and a “B” slice comprisesbi-directionally predicted inter-coded macroblocks. Inter-codedmacroblocks in “P” slices may only use one vector to predict a block ofpixels. Inter-coded macroblocks in “B” slices may use one or two vectorsto predict a block of pixels.

FIG. 2 is a block diagram of an exemplary H.264-based encoder, inconnection with an embodiment of the invention. Referring to FIG. 2, avideo encoder 102 may be adapted to support, for example, fidelity rangeextensions (FRExt) and a high profile mode of operation associated withthe H.264 standard specification. The video encoder 102 may comprise acurrent frame (Fn) source 202, a first digital adder 204, a forwardtransform (T) 206, a forward quantizer (Q) 208, an entropy encoder 210,a reference frames (Fn—1*) source 224, a motion estimator 226, a motioncompensator 228, an intra-coding selector 230, and an intra-codingpredictor 232, a reverse quantizer (Q⁻¹) 214, a reverse transform (T⁻¹)216, a second digital adder 218, a digital filter 220, and a currentreconstructed frame (Fn*) source 222.

During the encoding operation, the current frame source 202 may providea current frame or picture in a GOP for encoding. The current picturemay be processed in units of a macroblock, where a macroblockcorresponds to, for example, 16×16 pixels in the original image. Eachmacroblock may be encoded in intra-coded mode, for “I” pictures, or ininter-coded mode, for “P” and “B” pictures. In either mode, a predictionmacroblock P may be formed on a reconstructed frame or picture. Inintra-coded mode, the intra-coding selector 230 may select betweensample images from a current picture Fn and from pictures which havebeen previously encoded, decoded, and reconstructed as shown by theunfiltered reconstructed output uFn* of the second digital adder 218.The intra-coding predictor 232 may generate the predicted macroblock Pbased on the unfiltered reconstructed output uFn* and the selection madeby the intra-coding selector 230. In inter-coded mode, the predictedmacroblock P may be generated based on the current picture andmotion-compensated prediction from one or more reference frames in thereference frame source 224. The motion compensated prediction may beprovided by the motion estimator 226 and the motion compensator 228. Themotion compensated prediction may be based on at least one previousencoded and reconstructed picture in time and/or at least one subsequentencoded and reconstructed picture in time from the current picture beingencoded.

The predicted macroblock P may be subtracted from the current macroblockby the first digital adder 204 to generate a difference macroblock Dn.The difference macroblock may be transformed by the forward transform206 and quantized by the forward quantizer 208. The output of theforward quantizer 208 may be entropy encoded by the entropy encoder 210before being passed to the encoded video bit stream. The encoded videobit stream comprises the entropy-encoded video contents and any sideinformation necessary to decode the macroblock.

During the reconstruction operation, the results from the forwardquantizer 208 may be re-scaled and inverse transformed by the reversequantizer 214 and the inverse transform 216 to generate a reconstructeddifference macroblock Dn*. The prediction macroblock P may be added tothe reconstructed difference macroblock Dn* by the second digital adder218 to generate the unfiltered reconstructed output uFn*. The filter 220may be applied to uFn* to reduce the effects of blocking distortion anda reconstructed reference frame or picture may be generated Fn*.

FIG. 3A is a block diagram of a portion of an exemplary H.264-basedencoder with fixed transform size, in connection with an embodiment ofthe invention. Referring to FIG. 3A, the encoder 300 may be adapted tosupport, for example, fidelity range extensions (FRExt) and a highprofile mode of operation associated with the H.264 standardspecification. The video encoder 300 may comprise a prediction engine302, a best prediction block size selector 304, a 4×4 transformer 306, aquantizer 308, and an entropy encoder 310. The prediction engine 302 maycomprise a plurality of prediction size blocks 312 to 324. Theseprediction block sizes may be, for example, a 4×4 prediction block 312,a 4×8 prediction block 314, an 8×4 prediction block 316, an 8×8prediction block 318, a 16×8 prediction block 320, an 8×16 predictionblock 122, and/or a 16×16 prediction block 324.

The prediction engine 302 may comprise suitable logic, circuitry, and/orcode that may be adapted to perform intra-prediction andinter-prediction of macroblocks. The prediction engine 302 mayintra-predict or inter-predict portions or subblocks of a macroblock.When a block is encoded in intra mode, or intra-predicted orintra-coded, a prediction block P may be formed based on spatialprediction modes. In this regard, a block or prediction block may referto a 16×16 macroblock or to an M×N macroblock subblock, where M≦16 andN≦16. The prediction block P may be subtracted from the current block togenerate an error signal prior to encoding. The block contents may beluminance (luma) samples and/or may be chrominance (chroma) samples.There may be different spatial prediction modes for a specific blocksize based on the contents of the block. For example, an 8×8 chromablock may have 4 spatial prediction modes. The spatial prediction modechosen for a block may be one that minimizes the residual between theprediction block P and the current block. The choice of intra predictionmode may be part of the side information that is signaled to thedecoder.

Prediction based on motion compensation may be performed on a macroblockby dividing the macroblock into partitions and sub-partitions accordingto supported block sizes. When a block is encoded in inter mode, orinter-predicted or inter-coded, a prediction block P may be formed basedon previously encoded and reconstructed blocks. A separate motion vectormay be required for each partition and sub-partition of the predictedmacroblock. Each motion vector and the structure of the partition andsub-partitions may be encoded and transmitted to a decoder for videoreconstruction. For example, when large partitions or sub-partitions arechosen, a small number of bits may be necessary to signal to a decoderthe motion vector and the partition size.

The best prediction block size selector 304 may comprise suitable logic,circuitry, and/or code that may be adapted to determine the bestprediction block sizes to be used in predicting a macroblock. The bestprediction block size selector 304 may be adapted to determine a set ofbest prediction block sizes for a macroblock based on which predictionblock sizes minimize the residual between the prediction block P and thecurrent block. Information regarding the set of best prediction blocksizes may be encoded and transferred to a decoder for videoreconstruction.

The 4×4 transformer 306 may comprise suitable logic, circuitry, and/orcode that may be adapted to perform a forward transform on a predictedrepresentation of a current macroblock that utilizes a transform size.The 4×4 transformer 306 may be applied to both inter-predicted andintra-predicted images. The coefficients of the transform in the 4×4transformer 306 may be selected to reduce redundancies in the signal'sspatial content by compacting the signal's energy to as few basisfunctions as possible. For example, the transform coefficients may beprogrammable and there may be a different set of coefficients forintra-predicted images and for inter-predicted images. The quantizer 308may comprise suitable logic, circuitry, and/or code that may be adaptedto quantize or scale the transformed predicted image produced by the 4×4transformer 306. The scaling coefficients of the quantizer 308 may beprogrammable and there may be a different set of coefficients forintra-predicted images and for inter-predicted images. The entropyencoder 310 may comprise suitable logic, circuitry, and/or code that maybe adapted to encode the output of the quantizer 308 to generate anencoded video bit stream that may be transferred to at least one videodecoder. The entropy encoder 310 may also encode additional sideinformation that may be utilized by a decoder to reconstruct an imagefor display.

The video encoder 300 shown in FIG. 3A is limited to a 4×4 transformsize in the 4×4 transformer 306. This size transform may reduce theartifacts that are generally associated with larger transforms but itmay require that a large content of side information be transferred to adecoder to reconstruct the image.

FIG. 3B is a block diagram of a portion of an exemplary H.264-basedencoder where transform block size selection is tied to the bestprediction block size, in connection with an embodiment of theinvention. Referring to FIG. 3B, the video encoder 330 differs from thevideo encoder 300 in FIG. 3A in that an N×M transformer 332 may replacethe 4×4 transformer 306. The 4×4 transformer 332 may comprise suitablelogic, circuitry, and/or code that may be adapted to forward transform apredicted macroblock with an N×M transform size. The N×M transform sizemay be selected to be of the same size as the best prediction block sizeof the predicted block being transformed. For example, when a macroblockis best predicted with an 8×8 prediction size, the N×M transformer 132may utilize an 8×8 transform size. This approach may allow the use oflarger transforms to improve compression efficiency but may result inthe selection of large transform sizes for images with abrupttransitions. As with the 4×4 transformer 306 in FIG. 3A, the N×Mtransformer 332 may utilize different transform coefficients forinter-predicted and intra-predicted macroblocks.

FIG. 3C is a block diagram of a portion of an exemplary H.264-basedencoder where transform block size selection is based on image contentand the best prediction block size, in accordance with an embodiment ofthe invention. Referring to FIG. 3C, the video encoder 340 may differfrom the video encoder 330 in FIG. 3B in that a transform sizecontroller 342 may be added to the system. The transform size controller342 may comprise suitable logic, circuitry, and/or code that may beadapted to determine an N×M transform size to be utilized by the N×Mtransformer 332 for transforming inter-predicted and intra-predictedmacroblocks.

The N×M transformer 332 may determine the N×M transform size based on aset of rules and/or guidelines that allow for the video encoder 340 toachieve the efficiency objectives of H.264. The transform sizecontroller 342 may transfer information related to the transform sizeselection to the entropy encoder 310 for encoding. In this regard, thetransform size controller 342 may generate, for example, a transformsize syntax element that may comprise information regarding thetransform size that may be utilized for reconstruction of themacroblock. The encoded information may then be transferred to decodersto decode and reconstruct the picture. The decoders may then make use ofthese guidelines and rules utilized by the video encoder 340 to inversetransform the predicted macroblocks with a reduced amount of sideinformation.

FIG. 3D is a flow diagram that illustrates exemplary steps forgenerating a transform size syntax element in an H.264-based videoencoder, in accordance with an embodiment of the invention. Referring toFIG. 3D, after start step 352, in step 354, the video encoder 340 inFIG. 3C during a high profile mode of operation may determine whetherthe current macroblock is to be intra-predicted or inter-predicted. Whenthe current macroblock is to be intra-predicted, the video encoder 340may proceed to step 356 where a best prediction block size, that is, amacroblock type is selected for a current macroblock. When themacroblock type is a 4×4 macroblock type, the transform selected by thetransform block size controller 342 in FIG. 3C is a 4×4 transform size.When the macroblock type is an 8×8 macroblock type, the transform sizeselected is an 8×8 transform size. After completing step 356, the videodecoder 340 may proceed to step 364.

Returning to step 354, when the current macroblock is to beinter-predicted, the video decoder 340 may proceed to step 358. In step358, the video decoder 340 may determine whether the current macroblockis to be direct mode inter-predicted, where direct mode refers to a modeof operation where a macroblock inherits a macroblock type from acollocated macroblock in a particular reference picture. When thecurrent macroblock is not to be direct mode inter-predicted, that is,the current macroblock is to be inter-predicted, the video encoder 340may proceed to step 360. In step 360, the best prediction block sizeselector 304 may select a macroblock type and the transform sizecontroller 342 may select a corresponding transform size. In thisregard, a rule may be that the transform size may be equal to or smallerthan the inter-prediction block size. For example, when the macroblocktype is an 8×16, a 16×8, or a 16×16 macroblock type, the transform sizecontroller 342 may select a 4×4 transform size or an 8×8 transform sizein accordance with the contents of the video signal. When the macroblocktype is an 8×8 macroblock type, the transform size controller 342 mayselect a 4×4 transform size when the inter-predicted macroblock issubdivided. Moreover, the transform size controller 342 may select a 4×4transform size or an 8×8 transform size when the inter-predictedmacroblock is not subdivided. After completing step 360, the videodecoder 340 may proceed to step 364.

Returning to step 358, when the current macroblock is to be direct modeinter-predicted the video encoder 340 may proceed to step 362. In step362, direct mode inter-prediction may be specified at the macroblocklevel or at the 8×8 block level. When direct mode specified at themacroblock level, the prediction block size may be inherited from acorresponding collocated macroblock. In this regard, the macroblock typemay be a 16×16, a 16×8, an 8×16, or an 8×8 with sub 8×8 partitioningmacroblock type. When direct mode is specified at the 8×8 block level,the prediction block size may be inherited from a correspondingcollocated 8×8 block. In this regard, the macroblock type may be an 8×8with sub 8×8 partitioning macroblock type. When a direct mode signal,direct_(—)8×8_inference_flag, is set, which may be set for standarddefinition (SD) resolutions and higher resolutions, the inheritedprediction block size may be constrained to be 8×8 or larger and dynamictransform size selecting may be supported and a transform size syntaxelement, transform_size_(—)8×8_flag, may be placed in the bitstream.When the direct_(—)8×8_inference_flag is not set, since the predictionblock sizes may be smaller than 8×8, only the 4×4 transform size may beallowed and the transform_size_(—)8×8_flag is not placed in thebitstream.

In step 364, the transform size syntax element,transform_size_(—)8×8_flag, may be generated in accordance with theresults in steps 356, 360, or 362. For an inter-predicted macroblockwhere the selected macroblock type is an 8×8 macroblock type and themacroblock may be further subdivided, the transform size syntax elementmay not be transferred as part of the video stream to a video decoder.In step 366, the predicted and transformed macroblock and the generatedtransform size syntax element may be encoded and transferred to a videodecoder via the encoded video bit stream. After completing step 366, thevideo encoder 340 may proceed to end step 368.

FIG. 4 is a block diagram of an exemplary an H.264-based decoder, inaccordance with an embodiment of the invention. Referring to FIG. 4, thevideo decoder 104 in FIG. 1 may comprise a code input 402, a code buffer404, a symbol interpreter 408, a context memory block 406, a CPU 410, aspatial predictor 412, an inverse scanner, quantizer, and transformer(ISQDCT) 414, a motion compensator 416, a reconstructor 420, a deblockerfilter 424, a picture buffer 418, and a display engine 422.

The code buffer 402 may comprise suitable circuitry, logic and/or codethat may be adapted to receive and buffer a compressed video stream fromthe code input 402 prior to interpreting it by the symbol interpreter408. The compressed video stream may be encoded in a binary format usingCABAC or CAVLC, for example. Depending on the encoding method, the codebuffer 404 may be adapted to transfer portions of different lengths ofthe compressed video stream as may be required by the symbol interpreter408. The code buffer 404 may comprise a portion of a memory system, suchas a dynamic random access memory (DRAM).

The symbol interpreter 408 may comprise suitable circuitry, logic and/orcode that may be adapted to interpret the compressed video stream toobtain quantized frequency coefficients information and additional sideinformation necessary for decoding of the compressed video stream. Inthis regard, the symbol interpreter 408 may be adapted to obtain thetransform size syntax element generated by a video encoder andtransmitted as part of the side information. The symbol interpreter 408may also be adapted to interpret either CABAC or CAVLC encoded videostream, for example. In one aspect of the invention, the symbolinterpreter 408 may comprise a CAVLC decoder and a CABAC decoder.Quantized frequency coefficients determined by the symbol interpreter408 may be communicated to the ISQDCT 414, and the side information maybe communicated to the motion compensator 416 and the spatial predictor412.

The symbol interpreter 408 may also be adapted to provide the ISQDCT 414with information regarding the forward transformation of the encodedmacroblocks in the compressed video stream. In this regard, the symbolinterpreter 408 may transfer to the ISQDCT 414 the decoded transformsize syntax element. Depending on the prediction mode for eachmacroblock associated with an interpreted set of quantized frequencycoefficients, the symbol interpreter 408 may provide side informationeither to a spatial predictor 412, if spatial prediction was used duringencoding, or to a motion compensator 416, if temporal prediction wasused during encoding. The side information may comprise prediction modeinformation and/or motion vector information, for example.

The symbol interpreter 408 may also provide side information to thedeblocker filter 424. When the deblocker filter 424 is based on thenormative deblocking filter specified by the H.264 standard, the sideinformation may comprise prediction mode information, motion vectorinformation, quantization parameter information, and/or boundary pixelvalues to determine the strength of the deblocking filter across, forexample, 4×4 or 8×8 edge boundaries.

In order to increase processing efficiency, for example, a CPU 410 maybe coupled to the symbol interpreter 408 to coordinate the interpretingprocess for each macroblock within the encoded video bit stream. Inaddition, the symbol interpreter 408 may be coupled to a context memoryblock 406. The context memory block 406 may be adapted to store aplurality of contexts that may be utilized for interpreting the CABACand/or CAVLC-encoded bit stream. The context memory 406 may be anotherportion of the same memory system as the code buffer 404, or a portionof a different memory system, for example.

After interpreting the information from the code buffer 404 by thesymbol interpreter 408, sets of quantized frequency coefficients may becommunicated to the ISQDCT 414. The ISQDCT 414 may comprise suitablecircuitry, logic and/or code that may be adapted to generate aprediction error from a set of quantized frequency coefficients receivedfrom the symbol interpreter 408. For example, the ISQDCT 414 may beadapted to transform the quantized frequency coefficients back tospatial domain using an inverse transform of a size that may bedetermined by the transform size syntax element. In this regard, theinverse transform size may be determined from the set or rules andguidelines used by the encoder to forward transform the macroblocks.After the prediction error is generated, it may be communicated to thereconstructor 420.

The spatial predictor 412 and the motion compensator 416 may comprisesuitable circuitry, logic and/or code that may be adapted to generateprediction pixels utilizing side information received from the symbolinterpreter 408. For example, the spatial predictor 412 may generateprediction pixels for spatially predicted macroblocks, while the motioncompensator 416 may generate prediction pixels for temporally predictedmacroblocks. The prediction pixels generated by the motion compensator416 may comprise prediction pixels associated with motion compensationvectors in previously reconstructed pictures. The motion compensator 416may retrieve the prediction pixels from previously reconstructedpictures stored in the picture buffer 418. The picture buffer 418 maystore previously reconstructed pictures that may correspond to picturesthat occurred before and/or after the current picture being processed.

The reconstructor 420 may comprise suitable circuitry, logic and/or codethat may be adapted to receive the prediction error from the ISQDCT 414,as well as the prediction pixels from either the motion compensator 416or the spatial predictor 412 based on whether the prediction mode was atemporal or spatial prediction, respectively. The reconstructor 420 maythen generate a reconstructed output stream where reconstructedmacroblocks in the reconstructed output stream make up a reconstructedpicture. The reconstructed output stream may be generated based on theprediction error and the side information received from either thespatial predictor 412 or the motion compensator 416. The reconstructedoutput stream may then be transferred to the deblocker filter 424 forspatial filtering.

When the spatial predictor 412 is utilized for generating predictionpixels, reconstructed macroblocks may be communicated back from thereconstructor 420 to the spatial predictor 412. In this way, the spatialpredictor 412 may utilize pixel information along a left, a corner or atop border with a neighboring macroblock to obtain pixel estimationwithin a current macroblock.

The deblocker filter 424 may comprise suitable circuitry, logic and/orcode that may be adapted to spatially filter the reconstructed outputstream received from the reconstructor 420 to reduce blocking artifacts.These blocking artifacts may be associated with missing pixelinformation along one or more borders between neighboring macroblocksand/or with spatial low frequency offsets between macroblocks.

The picture buffer 418 may be adapted to store one or more filteredreconstructed pictures in the filtered reconstructed output streamreceived from the deblocker filter 424. The picture buffer 418 may alsobe adapted to transfer filtered reconstructed pictures to the motioncompensator 416. In addition, the picture buffer 418 may transfer apreviously filtered reconstructed picture back to the deblocker filter424 so that a current macroblock within a current picture may bespatially filtered to remove or reduce blocking artifacts. The picturebuffer 418 may also transfer one or more filtered reconstructed picturesto the display engine 422. The display engine 422 may comprise suitablelogic, circuitry, and/or code that may be adapted to output the filteredreconstructed output stream to a video display, for example.

The transform size syntax element generated by the video encoder 340,for example, and received by the video decoder 104 in FIG. 4 during ahigh profile mode of operation may be based on the observation that atstandard definition (SD) resolution and above, the use of block sizessmaller than 8×8 is limited, and therefore new coding tools, a luma 8×8transform and a luma 8×8 intra prediction mode may be utilized. In thisregard, a transform mode, Transform8, may be utilized to indicate thatan 8×8 transform may be in use or enabled for block sizes 8×8 and above.The mode may be enabled by the transform size syntax element,transform_(—)8×8_mode_flag, in the Picture Parameter Set RBSP.

As a result, one or more of the following simplifications or conditionsmay be applied: transform sizes are not to be mixed within a macroblock;limit the larger transform size to 8×8, that is, do not use 8×4 and 4×8transforms; limit the new intra modes to 8×8, that is, do not use 8×4and 4×8 intra modes; allow an intra 16×16 mode when Transform8 isenabled; limit the use of the Transform8 mode to when the syntax elementlevel×10 is greater than or equal to 40, that is, level>=3, since atthese levels the syntax element direct_(—)8×8_inference_flag is equal tologic 1 ensuring that direct mode vectors are never applied to smallerthan 8×8 blocks; limit the use of the Transform8 mode to when the syntaxelement profile is equal to the Professional Extensions; and limit theuse of the Transform8 mode to when the syntax elemententropy_coding_mode_flag is equal to logic 1, that is, CABAC is enabledin, for example, the symbol interpreter 408 in FIG. 4.

In addition to the transform size syntax element, additional syntaxelements may be utilized. For macroblock types P_(—)8×8 and B_(—)8×8,the syntax element all_(—)8×8 equal to logic 1 may be used to indicatethat all four 8×8 subpartitions are using 8×8 block size. In this case,the 8×8 transform size is used. Otherwise, when all_(—)8×8 is equal tologic 0, block sizes smaller than 8×8 may be in use and so the existing4×4 transform size is used. For the syntax element mb_type is equal tologic 0, the syntax element intra_pred_size may be used to indicatewhether the macroblock type is Intra 4×4, that is, the syntax elementintra_pred_size is equal to logic 0, or Intra_(—)8×8. When themacroblock type is Intra_(—)8×8, the syntax elementsprev_intra8×8_pred_mode_flag and rem_intra8×8_pred_mode may be used todetermine the specific 8×8 intra mode used.

TABLE 1 Luma transform size. Luma Transform Macroblock Type transform_8× 8_mode_flag all_8 × 8 Size Intra_4 × 4 na na 4 × 4 Intra_8 × 8 na na 8× 8 Intra_16 × 16 na na 4 × 4 P_16 × 16 0 na 4 × 4 1 na 8 × 8 P_8 × 16 0na 4 × 4 1 na 8 × 8 P_16 × 8 0 na 4 × 4 1 na 8 × 8 P_8 × 8 0 na 4 × 4 10 4 × 4 1 1 8 × 8 B_Direct 0 na 4 × 4 1 na 8 × 8 B_16 × 16 0 na 4 × 4 1na 8 × 8 B_16 × 8 0 na 4 × 4 1 na 8 × 8 B_8 × 16 0 na 4 × 4 1 na 8 × 8B_8 × 8 0 na 4 × 4 1 0 4 × 4 1 1 8 × 8

Table 1 indicates an exemplary mapping of macroblock type to lumatransform size that results from the addition of the new syntax elementsto the encoding and decoding operations in H.264 standardspecifications. For example, Table 1 comprises intra-coded macroblocktypes Intra_(—)4×4, Intra_(—)8×8, and Intra_(—)16×16, inter-codedmacroblock types P_(—)16×16, P_(—)8×16, P_(—)16×8, P_(—)8×8, B_(—)16×16,B_(—)8×16, B_(—)16×8, B_(—)8×8, and B_direct, where B_direct correspondsto a macroblock in a “B” slice that is in direct mode with a collocatedmacroblock in a particular reference picture.

FIG. 5 is a flow diagram illustrating exemplary steps for inversetransform block size selection in an H.264-based video decoder based ona transform size syntax element, in accordance with an embodiment of theinvention. Referring to FIG. 5, after start step 502, in step 504, thevideo decoder 104 in FIG. 1 may determine whether the current decodedmacroblock is an intra-coded macroblock. When the macroblock isintra-coded, the video encoder 104 may proceed to step 506 to determinethe transform size. In step 506, the high profile mode and the 8×8transform in the video decoder 104 may be enabled. The decoding of amacroblock type to I_(—)4×4 may be changed semantically to mean I_N×N.When the macroblock type is decoded to mean I_N×N, thetransform_size_(—)8 x8_flag syntax element may indicate whether N×Ncorresponds to a 4×4 transform size or to an 8×8 transform size. Whenthe transform_size_(—)8×8_flag syntax element indicates an 8×8 transformsize, then an 8×8 spatial prediction and an 8×8 transform are used.Otherwise, an 4×4 spatial prediction and a 4×4 transform are used. Theapproach described for intra-coded macroblocks allows the support of an8×8 spatial prediction mode without the need to cause many VLC tables orCABAC context tables. After determining the inverse transform size, theflow diagram 500 may proceed to step 514.

Returning to step 504, when the macroblock is not an intra-codedmacroblock, the video decoder 104 may proceed to step 508. In step 508,the video decoder 104 may determine whether the macroblock is a directmode inter-coded macroblock. When the macroblock is a not a direct modemacroblock, the video decoder 104 may proceed to step 510. In step 510,when the macroblock type was 8×16, 16×8, or 16×16, then the transformsize could be either a 4×4 transform size or an 8×8 transform and thatthe transform size may be indicated using the transform_size_(—)8×8_flagsyntax element, that is, the transform_size_(—)8×8_flag syntax elementmay indicate whether the 4×4 transform size or the 8×8 transform size isto be used. When the macroblock type is 8×8, then the video decoder 104determines whether any of the 8×8 blocks were subdivided. If the blockswere to, for example, 4×4, 4×8, or 8×4, then only the 4×4 transform sizemay be used and the transform_size_(—)8×8_flag syntax element may notneed to be in the encoded video bit stream. When none of the 8×8 blockswere subdivided, then the transform_size_(—)8×8_flag syntax element isin the encoded video bit stream to indicate whether the 4×4 transformsize or the 8×8 transform size is to be used. After determining theinverse transform size, the flow diagram 500 may proceed to step 514.

Returning to step 508, when the macroblock is a direct mode macroblock,the video decoder 104 may proceed to step 512. In step 512, when theinter-coded macroblocks are part of a “B” slice, the whole macroblockmay be direct mode, B_Direct_(—)16×16, or an individual 8×8 block can bedirect mode, B_Direct_(—)8×8. In either case, the macroblock or theblock may inherit the block size of the collocated macroblock or thecollocated block in a particular reference picture. The collocated blocksize may not be known during stream parsing. In this regard, the videodecoder 104 may use the 4×4 transform size when an inherited 8×8 blocksize may be further subdivided. Because for standard definition (SD)resolutions and above the inherited block may generally be 8×8 orlarger, which may be indicated by a direct_(—)8×8_inference flag syntaxelement being set to logic 1 for SD and higher resolution, and thetransform_size_(—)8×8_flag syntax element is in the encoded video bitstream and may be utilized to determine whether the 4×4 transform sizeor the 8×8 transform size is to be used. After determining the inversetransform size, the flow diagram 500 may proceed to step 514.

In step 514, the video decoder 104 in FIG. 1 may inverse transform thereceived macroblock based on the selected inverse transform size ineither steps 506, 510, or 512. After completing step 514, the videodecoder 104 may proceed to end step 516.

These selection rules and guidelines, and the syntax elements presentedherein for the high profile mode in the H.264 standard specification maycombine the benefits of reduced residual correlation through bettersignal prediction selection with the benefits of large transform sizesin areas without high detail and/or sharp transitions.

Accordingly, the present invention may be realized in hardware,software, or a combination of hardware and software. The presentinvention may be realized in a centralized fashion in at least onecomputer system, or in a distributed fashion where different elementsare spread across several interconnected computer systems. Any kind ofcomputer system or other apparatus adapted for carrying out the methodsdescribed herein is suited. A typical combination of hardware andsoftware may be a general-purpose computer system with a computerprogram that, when being loaded and executed, controls the computersystem such that it carries out the methods described herein.

The present invention may also be embedded in a computer programproduct, which comprises all the features enabling the implementation ofthe methods described herein, and which when loaded in a computer systemis able to carry out these methods. Computer program in the presentcontext means any expression, in any language, code or notation, of aset of instructions intended to cause a system having an informationprocessing capability to perform a particular function either directlyor after either or both of the following: a) conversion to anotherlanguage, code or notation; b) reproduction in a different materialform.

While the present invention has been described with reference to certainembodiments, it will be understood by those skilled in the art thatvarious changes may be made and equivalents may be substituted withoutdeparting from the scope of the present invention. In addition, manymodifications may be made to adapt a particular situation or material tothe teachings of the present invention without departing from its scope.Therefore, it is intended that the present invention not be limited tothe particular embodiment disclosed, but that the present invention willinclude all embodiments falling within the scope of the appended claims.

What is claimed is:
 1. A method for video signal processing, the method comprising: determining that a macroblock is to be intra-predicted; selecting a macroblock type having a first size based on said determining; selecting a 4×4 transform size when said macroblock type is a 4×4 macroblock type and selecting an 8×8 transform size when said macroblock type is an 8×8 macroblock type; and generating a transform syntax element based on said transform size to indicate an inverse transform size to a video decoder for use with said intra-predicted macroblock. 